
package com.plian.system.wrapper.bpa;

import com.plian.system.dto.bpa.BusinessAssessmentScoreDTO;
import com.plian.system.entity.bpa.BusinessAssessmentScore;
import com.plian.system.mybatis.support.BaseWrapper;
import com.plian.system.vo.bpa.BusinessAssessmentScoreVO;
import com.plian.system.wrapper.util.CacheWrapperUtil;
import com.plian.system.wrapper.util.WrapperUtil;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import static com.plian.system.wrapper.util.WrapperConstant.DICT_CODE_TO_NAME;
import static com.plian.system.wrapper.util.WrapperConstant.SPRING;

/**
 *
 *
 * @author BladeX
 * @since 2021-05-07
 */
@Mapper(componentModel = SPRING, uses = {CacheWrapperUtil.class, WrapperUtil.class})
public interface BusinessAssessmentScoreWrapper extends BaseWrapper<BusinessAssessmentScore, BusinessAssessmentScoreDTO, BusinessAssessmentScoreVO> {

    @Override
    @Mappings(value = {
            @Mapping(source = "compareTypeCode", target = "compareTypeName", qualifiedByName = DICT_CODE_TO_NAME),
            @Mapping(source = "compareStandardCode", target = "compareStandardName", qualifiedByName = DICT_CODE_TO_NAME)
    })
    BusinessAssessmentScoreVO entityToVO(BusinessAssessmentScore entity);
}
